#include<stdio.h>

long fact(long num)
{
    if(num == 1)
    {
        return 1;
    }
    else
    {
        return fact(num-1) * num;
    }
}

int main()
{
    int n;
    scanf("%d", &n);

    printf("%ld", fact(n));

    return 0;
}
